package com.cskaoyan.service;

import com.cskaoyan.bean.bo.GoodsCategoryBO;
import com.cskaoyan.bean.bo.GoodsCommentListBo;
import com.cskaoyan.bean.bo.GoodsListBo;
import com.cskaoyan.bean.bo.GoodsUpdateBo;
import com.cskaoyan.bean.pojo.OrderGoods;
import com.cskaoyan.bean.pojo.*;
import com.cskaoyan.bean.vo.*;
import com.cskaoyan.bean.vo.wx.FloorGoodsVo;

import java.util.List;

/**
 * @author yfsper233
 * @class GoodsService
 */
public interface GoodsService {

    /**
     * @author: yfs
     * @title: queryGoodsList
     * @description: 根据goodsListBo查找goods表信息
     */
    GoodsListVo queryGoodsList(GoodsListBo goodsListBo);

    /**
     * @author: yfs
     * @title: queryGoodsCatAndBrand
     * @description: 查询category信息,查询商品种类和品牌信息，涉及brand，category两张表
     */
    GoodsCatAndBrandVo queryGoodsCatAndBrand();

    /**
     * yfs
     * 根据商品id获得商品详情  包括goods，category，product，attribute，specification 五张表
     */
    GoodsDetailVo queryGoodsDetail(Integer id);
    /**
     * 杨丰韶
     * 更新商品信息，包括goods，product，attribute，specification 四张表
     */
    Integer changeGood(GoodsUpdateBo goods);
    /**
     * @author: lsy
     * @title: queryOrdersByGoodsId
     * @description: 根据goodsId查找order_goods表信息
     * @param: [goodsId]
     * @return: java.util.List<com.cskaoyan.bean.pojo.OrderGoods>
     */
    List<OrderGoods> queryOrdersByGoodsId(int goodsId);

    /**
     * 杨丰韶
     * 新增商品信息，包括goods，product，attribute，specification 四张表
     */
    Integer addGood(GoodsUpdateBo goodsUpdate);

    /**
     * 杨丰韶
     * 根据商品id（逻辑）删除商品及其相关信息 包括goods，product，attribute，specification 四张表
     * @param goodsId
     * @return
     */
    Integer removeGoodsDetail(Integer goodsId);

    List<Goods> queryNewGoodsList();

    List<Goods> queryHotGoodsList();

    List<FloorGoodsVo> queryFloorGoodsList(int num);

    List<Brand> queryGoodsBrand();

    /**
     * @author: lsy
     * @title: queryGoodsCategory
     * @description: 查询所有种类信息
     * @param: []
     * @return: java.util.List<com.cskaoyan.bean.pojo.Category>
     */
    List<Category> queryGoodsCategory();

    /**
     * @author: lsy
     * @title: queryGoodsByOrderId
     * @description: 根据orderid查询goods信息
     * @param: [orderId]
     * @return: com.cskaoyan.bean.pojo.OrderGoods
     */
    List<OrderGoods> queryOrderGoodsByOrderId(int orderId);

    /**
     * @author: lsy
     * @title: queryOrderByOrderId
     * @description: 根据orderid查询goods信息
     * @param: [orderId]
     * @return: com.cskaoyan.bean.pojo.Order
     */
    Order queryOrderByOrderId(int orderId);

    /**
     * 杨丰韶
     * 根据GoodsCommentListBo中的条件查询商品评价，涉及comment表
     * @param listBo
     * @return
     */
    GoodsCommentListVo queryGoodsCommentList(GoodsCommentListBo listBo);

    /**
     * 杨丰韶
     * 控评，涉及comment表
     * @param id
     * @return
     */
    Integer removeGoodsComment(Integer id);

    /** 
     * @author thz
     * @title queryGoodsCount
     * @description: 商品数量 
     * @param: [] 
     * @return: com.cskaoyan.bean.vo.GoodsCountVO 
     */ 
    GoodsCountVO queryGoodsCount();

    /** 
     * @author thz
     * @title queryWxGoodsCategory
     * @description: 商品类目 
     * @param: [id] 
     * @return: com.cskaoyan.bean.vo.GoodsCategoryVO 
     */ 
    GoodsCategoryVO queryWxGoodsCategory(Integer id);

    /** 
     * @author thz
     * @title queryWxGoodsList
     * @description: 商品列表 
     * @param: [goodsCategoryBO] 
     * @return: com.cskaoyan.bean.vo.WxGoodsListVO 
     */ 
    WxGoodsListVO queryWxGoodsList(GoodsCategoryBO goodsCategoryBO, User user);

    /** 
     * @author thz
     * @title queryWxGoodsDetail
     * @description: 商品详情
     * @param: [id] 
     * @return: com.cskaoyan.bean.vo.WxGoodsDetailVO 
     */ 
    WxGoodsDetailVO queryWxGoodsDetail(Integer id);

    /**
     * @author thz
     * @title queryRelatedGoods
     * @description: 相关商品
     * @param: [id]
     * @return: com.cskaoyan.bean.vo.WxGoodsRelatedVo
     */
    WxGoodsRelatedVo queryRelatedGoods(Integer id);

    /**
     * @author: lsy
     * @title: queryGoodsProductById
     * @description: 根据productId查询GoodsProduct
     * @param: [productId]
     * @return: com.cskaoyan.bean.pojo.GoodsProduct
     */
    GoodsProduct queryGoodsProductById(int productId);

    int changeGoodsProductById(GoodsProduct goodsProduct, int id);
}
